package com.rchat.pocmini.activity.chatmessage;

import android.content.Context;

import com.airtalkee.sdk.entity.AirMessage;
import com.rchat.pocmini.db.MemoryDataStoreModel;

import java.util.List;

/**
 * Created by ljd on 2017/9/28.
 */

public class ChatMessageModelImpl implements ChatMessageContract.Model {

    @Override
    public List<AirMessage> loadFirstPageData(Context context, String groupId, int currentPage, int lineSize) {
        return MemoryDataStoreModel.get(context).loadMessageInfos(groupId, currentPage, lineSize);
    }

    @Override
    public int getAllMessagesCount(Context context, String groupId) {
        return MemoryDataStoreModel.get(context).getAllMessagesCount(groupId);
    }

    @Override
    public List<AirMessage> loadMessageInfos(Context context, String groupId, int currentPage, int lineSize) {
        return MemoryDataStoreModel.get(context).loadMessageInfos(groupId, currentPage, lineSize);
    }

}
